message("compile Src")
 
#ADD_EXECUTABLE(AudioInTest AudioInTest.c)
#aux_source_directory(. SRCS)
#message("SRC=" ${SRCS})

find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS IHttp.proto)

# protobuf
#execute_process(COMMAND protoc  ${PROJECT_SOURCE_DIR}/Src/http.proto --cpp_out=${PROJECT_SOURCE_DIR}/Src)

#protoc TTSService.proto --cpp_out=. 

ADD_LIBRARY(ttsservice STATIC 
	DebugInfo.cc
    RPCContext.cc 
    Statistics.cc  
    BrpcServer.cc 
    IHttpServer.cc  
    TTSServiceImpl.cc 
    RequestObj.cc  
    HttpParam.cc 
    RequestSession.cc 
    SessionCache.cc 
    Lock.cc 
    TTSEngineMgr.cc 
    CommFunc.cc 
    HttpAck.cc
	${PROTO_SRCS}
	)

add_executable(TTSServiceBin  main.cc)
target_link_libraries(TTSServiceBin  ttsservice)


